# Copyright (C) 2014-2021  CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#

from GeomAPI import *
from SketchAPI import *

from salome.shaper import model

model.begin()
partSet = model.moduleDocument()
Part_1 = model.addPart(partSet)
Part_1_doc = Part_1.document()
model.addParameter(Part_1_doc, "r1", "26.5")
model.addParameter(Part_1_doc, "r2", "22")
model.addParameter(Part_1_doc, "entraxe", "80")
Parameter_Epaisseur = model.addParameter(Part_1_doc, "epaisseur", "34")
model.addParameter(Part_1_doc, "ep", "4")
model.addParameter(Part_1_doc, "d1", "112")
model.addParameter(Part_1_doc, "d2", "24")
model.addParameter(Part_1_doc, "d3", "5")
model.addParameter(Part_1_doc, "r3", "2.5")
model.addParameter(Part_1_doc, "dtrou", "9")
model.addParameter(Part_1_doc, "ep_o", "24")
model.addParameter(Part_1_doc, "d_per", "2.5")
model.addParameter(Part_1_doc, "r4", "15")
model.addParameter(Part_1_doc, "h", "45")
model.addParameter(Part_1_doc, "ep_o2", "5")
model.addParameter(Part_1_doc, "d_o", "10")
model.addParameter(Part_1_doc, "h_o", "57")
model.addParameter(Part_1_doc, "p_trou1", "29.2")
model.addParameter(Part_1_doc, "p2_trou1", "19.2")
model.addParameter(Part_1_doc, "p_trou2", "46")
model.addParameter(Part_1_doc, "p2_trou", "36.5")
model.addParameter(Part_1_doc, "h_p", "40")
model.addParameter(Part_1_doc, "M8", "4")
model.addParameter(Part_1_doc, "r_trou2", "10")
model.addParameter(Part_1_doc, "r_al1", "12.5")
model.addParameter(Part_1_doc, "r_al2", "14")
model.addParameter(Part_1_doc, "coeff", "1")
Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchCircle_1 = Sketch_1.addCircle(0, 0, 15)
SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
SketchCircle_2 = Sketch_1.addCircle(80, 0, 15)
SketchCircle_3 = Sketch_1.addCircle(0, 0, 12.5)
SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_3.center())
SketchCircle_4 = Sketch_1.addCircle(80, 0, 14)
SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchCircle_2.center(), SketchCircle_4.center())
SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_3.results()[1], "r_al1*coeff")
SketchConstraintRadius_2 = Sketch_1.setRadius(SketchCircle_4.results()[1], "r_al2*coeff")
SketchConstraintRadius_3 = Sketch_1.setRadius(SketchCircle_1.results()[1], "r4*coeff")
SketchConstraintRadius_4 = Sketch_1.setRadius(SketchCircle_2.results()[1], "r4*coeff")
SketchConstraintDistance_1 = Sketch_1.setDistance(SketchCircle_3.center(), SketchCircle_4.center(), "entraxe*coeff")
SketchArc_1 = Sketch_1.addArc(0, 0, 13.96424004376894, -17, 13.96424004376894, 17, True)
SketchArc_1.setName("SketchArc_4")
SketchArc_1.result().setName("SketchArc_4")
SketchArc_1.results()[1].setName("SketchArc_4_2")
SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchCircle_3.center(), SketchArc_1.center())
SketchConstraintCoincidence_4.setName("SketchConstraintCoincidence_7")
SketchLine_1 = Sketch_1.addLine(13.96424004376894, 17, 66.03575995620928, 17)
SketchLine_1.setName("SketchLine_6")
SketchLine_1.result().setName("SketchLine_6")
SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchArc_1.endPoint(), SketchLine_1.startPoint())
SketchConstraintCoincidence_5.setName("SketchConstraintCoincidence_18")
SketchLine_2 = Sketch_1.addLine(13.96424004376894, -17, 66.03575995623092, -17)
SketchLine_2.setName("SketchLine_10")
SketchLine_2.result().setName("SketchLine_10")
SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_2.result())
SketchConstraintHorizontal_1.setName("SketchConstraintHorizontal_5")
SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_1.result())
SketchConstraintHorizontal_2.setName("SketchConstraintHorizontal_6")
SketchLine_3 = Sketch_1.addLine(model.selection("EDGE", "PartSet/OX"))
SketchLine_3.setName("SketchLine_11")
SketchLine_3.result().setName("SketchLine_11")
SketchConstraintCoincidence_6 = Sketch_1.setCoincident(SketchArc_1.startPoint(), SketchLine_2.startPoint())
SketchConstraintCoincidence_6.setName("SketchConstraintCoincidence_15")
SketchConstraintRadius_5 = Sketch_1.setRadius(SketchArc_1.results()[1], "r2*coeff")
SketchConstraintDistance_2 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchLine_3.result(), "epaisseur/2*coeff")
SketchConstraintDistance_3 = Sketch_1.setDistance(SketchArc_1.endPoint(), SketchLine_2.result(), "epaisseur*coeff")
SketchArc_2 = Sketch_1.addArc(80, 0, 66.03575995623092, -17, 66.03575995620928, 17, False)
SketchConstraintCoincidence_7 = Sketch_1.setCoincident(SketchCircle_2.center(), SketchArc_2.center())
SketchConstraintCoincidence_7.setName("SketchConstraintCoincidence_8")
SketchConstraintCoincidence_8 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchArc_2.startPoint())
SketchConstraintCoincidence_8.setName("SketchConstraintCoincidence_9")
SketchConstraintCoincidence_9 = Sketch_1.setCoincident(SketchArc_2.endPoint(), SketchLine_1.endPoint())
SketchConstraintCoincidence_9.setName("SketchConstraintCoincidence_10")
SketchConstraintCoincidence_10 = Sketch_1.setCoincident(SketchCircle_2.center(), SketchLine_3.result())
SketchConstraintCoincidence_10.setName("SketchConstraintCoincidence_11")
SketchConstraintEqual_1 = Sketch_1.setEqual(SketchArc_1.results()[1], SketchArc_2.results()[1])
SketchArc_3 = Sketch_1.addArc(0, 0, 15.46247221747307, -11.0413745939477, 18.89444362769119, -2, False)
SketchArc_3.setName("SketchArc_7")
SketchArc_3.result().setName("SketchArc_7")
SketchArc_3.results()[1].setName("SketchArc_7_2")
SketchConstraintCoincidence_11 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchArc_3.center())
SketchConstraintCoincidence_11.setName("SketchConstraintCoincidence_54")
SketchArc_4 = Sketch_1.addArc(0, 0, 18.89444362769119, 2, 15.46247221747308, 11.04137459394768, False)
SketchArc_4.setName("SketchArc_8")
SketchArc_4.result().setName("SketchArc_8")
SketchArc_4.results()[1].setName("SketchArc_8_2")
SketchConstraintCoincidence_12 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchArc_4.center())
SketchConstraintCoincidence_12.setName("SketchConstraintCoincidence_55")
SketchConstraintEqual_2 = Sketch_1.setEqual(SketchArc_4.results()[1], SketchArc_3.results()[1])
SketchConstraintEqual_2.setName("SketchConstraintEqual_8")
SketchArc_5 = Sketch_1.addArc(17.5, 12.49632352941176, 15.46247221747308, 11.04137459394768, 17.5, 15, True)
SketchArc_5.setName("SketchArc_9")
SketchArc_5.result().setName("SketchArc_9")
SketchArc_5.results()[1].setName("SketchArc_9_2")
SketchConstraintCoincidence_13 = Sketch_1.setCoincident(SketchArc_4.endPoint(), SketchArc_5.startPoint())
SketchConstraintCoincidence_13.setName("SketchConstraintCoincidence_56")
SketchConstraintTangent_1 = Sketch_1.setTangent(SketchArc_4.results()[1], SketchArc_5.results()[1])
SketchArc_6 = Sketch_1.addArc(17.5, -12.49632352941177, 15.46247221747307, -11.0413745939477, 17.5, -15, False)
SketchArc_6.setName("SketchArc_10")
SketchArc_6.result().setName("SketchArc_10")
SketchArc_6.results()[1].setName("SketchArc_10_2")
SketchConstraintCoincidence_14 = Sketch_1.setCoincident(SketchArc_3.startPoint(), SketchArc_6.startPoint())
SketchConstraintCoincidence_14.setName("SketchConstraintCoincidence_57")
SketchConstraintTangent_2 = Sketch_1.setTangent(SketchArc_3.results()[1], SketchArc_6.results()[1])
SketchLine_4 = Sketch_1.addLine(17.5, 15, 38, 15)
SketchLine_4.setName("SketchLine_42")
SketchLine_4.result().setName("SketchLine_42")
SketchConstraintCoincidence_15 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_4.startPoint())
SketchConstraintCoincidence_15.setName("SketchConstraintCoincidence_58")
SketchLine_5 = Sketch_1.addLine(18.89444362769119, -2, 34.49444362769118, -2)
SketchLine_5.setName("SketchLine_44")
SketchLine_5.result().setName("SketchLine_44")
SketchConstraintCoincidence_16 = Sketch_1.setCoincident(SketchArc_3.endPoint(), SketchLine_5.startPoint())
SketchConstraintCoincidence_16.setName("SketchConstraintCoincidence_60")
SketchLine_6 = Sketch_1.addLine(18.89444362769119, 2, 34.49444362769118, 2)
SketchLine_6.setName("SketchLine_45")
SketchLine_6.result().setName("SketchLine_45")
SketchConstraintCoincidence_17 = Sketch_1.setCoincident(SketchArc_4.startPoint(), SketchLine_6.startPoint())
SketchConstraintCoincidence_17.setName("SketchConstraintCoincidence_61")
SketchLine_7 = Sketch_1.addLine(38, 15, 38, 5.505556372308819)
SketchLine_7.setName("SketchLine_46")
SketchLine_7.result().setName("SketchLine_46")
SketchConstraintCoincidence_18 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_7.startPoint())
SketchConstraintCoincidence_18.setName("SketchConstraintCoincidence_62")
SketchConstraintEqual_3 = Sketch_1.setEqual(SketchArc_5.results()[1], SketchArc_6.results()[1])
SketchConstraintEqual_3.setName("SketchConstraintEqual_9")
SketchConstraintEqual_4 = Sketch_1.setEqual(SketchLine_5.result(), SketchLine_6.result())
SketchConstraintEqual_4.setName("SketchConstraintEqual_11")
SketchConstraintHorizontal_3 = Sketch_1.setHorizontal(SketchLine_6.result())
SketchConstraintHorizontal_3.setName("SketchConstraintHorizontal_12")
SketchConstraintHorizontal_4 = Sketch_1.setHorizontal(SketchLine_4.result())
SketchConstraintHorizontal_4.setName("SketchConstraintHorizontal_13")
SketchConstraintHorizontal_5 = Sketch_1.setHorizontal(SketchLine_5.result())
SketchConstraintHorizontal_5.setName("SketchConstraintHorizontal_14")
SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_7.result())
SketchConstraintVertical_1.setName("SketchConstraintVertical_7")
SketchLine_8 = Sketch_1.addLine(40, 17, 40, -17)
SketchLine_8.setName("SketchLine_47")
SketchLine_8.result().setName("SketchLine_47")
SketchLine_8.setAuxiliary(True)
SketchConstraintCoincidence_19 = Sketch_1.setCoincident(SketchLine_8.startPoint(), SketchLine_1.result())
SketchConstraintCoincidence_19.setName("SketchConstraintCoincidence_63")
SketchConstraintCoincidence_20 = Sketch_1.setCoincident(SketchLine_8.endPoint(), SketchLine_2.result())
SketchConstraintCoincidence_20.setName("SketchConstraintCoincidence_64")
SketchConstraintMiddle_1 = Sketch_1.setMiddlePoint(SketchLine_8.startPoint(), SketchLine_1.result())
SketchConstraintMiddle_1.setName("SketchConstraintMiddle_4")
SketchConstraintMiddle_2 = Sketch_1.setMiddlePoint(SketchLine_8.endPoint(), SketchLine_2.result())
SketchConstraintMiddle_2.setName("SketchConstraintMiddle_5")
SketchPoint_2 = Sketch_1.addPoint(40, 2.220450266386716e-15)
SketchPoint_2.setName("SketchPoint_7")
SketchPoint_2.result().setName("SketchPoint_7")
SketchConstraintCoincidence_21 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchLine_8.result())
SketchConstraintCoincidence_21.setName("SketchConstraintCoincidence_65")
SketchConstraintMiddle_3 = Sketch_1.setMiddlePoint(SketchLine_8.result(), SketchPoint_2.coordinates())
SketchConstraintMiddle_3.setName("SketchConstraintMiddle_6")
SketchConstraintDistance_4 = Sketch_1.setDistance(SketchLine_6.startPoint(), SketchLine_3.result(), "2*coeff")
SketchConstraintDistance_4.setName("SketchConstraintDistance_17")
SketchConstraintDistance_5 = Sketch_1.setDistance(SketchArc_3.endPoint(), SketchLine_3.result(), "2*coeff")
SketchConstraintDistance_5.setName("SketchConstraintDistance_18")
SketchConstraintRadius_6 = Sketch_1.setRadius(SketchArc_4.results()[1], "(r4+4)*coeff")
SketchConstraintRadius_6.setName("SketchConstraintRadius_13")
SketchConstraintDistance_6 = Sketch_1.setDistance(SketchLine_4.endPoint(), SketchLine_8.result(), "2*coeff")
SketchConstraintDistance_6.setName("SketchConstraintDistance_19")
SketchArc_7 = Sketch_1.addArc(40, 0, 34.49444362769118, 2, 38, 5.505556372308819, True)
SketchArc_7.setName("SketchArc_11")
SketchArc_7.result().setName("SketchArc_11")
SketchArc_7.results()[1].setName("SketchArc_11_2")
SketchConstraintCoincidence_22 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchArc_7.center())
SketchConstraintCoincidence_22.setName("SketchConstraintCoincidence_66")
SketchConstraintCoincidence_23 = Sketch_1.setCoincident(SketchLine_6.endPoint(), SketchArc_7.startPoint())
SketchConstraintCoincidence_23.setName("SketchConstraintCoincidence_67")
SketchArc_8 = Sketch_1.addArc(40, 0, 34.49444362769118, -2, 37.95784774655168, -5.490060577298436, False)
SketchArc_8.setName("SketchArc_12")
SketchArc_8.result().setName("SketchArc_12")
SketchArc_8.results()[1].setName("SketchArc_12_2")
SketchConstraintCoincidence_24 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchArc_8.center())
SketchConstraintCoincidence_24.setName("SketchConstraintCoincidence_68")
SketchConstraintCoincidence_25 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchArc_8.startPoint())
SketchConstraintCoincidence_25.setName("SketchConstraintCoincidence_69")
SketchConstraintCoincidence_26 = Sketch_1.setCoincident(SketchArc_7.endPoint(), SketchLine_7.endPoint())
SketchConstraintCoincidence_26.setName("SketchConstraintCoincidence_72")
SketchConstraintDistance_7 = Sketch_1.setDistance(SketchArc_5.endPoint(), SketchLine_1.result(), "2*coeff")
SketchConstraintDistance_7.setName("SketchConstraintDistance_21")
SketchConstraintTangent_3 = Sketch_1.setTangent(SketchArc_5.results()[1], SketchLine_4.result())
SketchCircle_5 = Sketch_1.addCircle(40, -13, 2.5)
SketchCircle_5.setName("SketchCircle_11")
SketchCircle_5.result().setName("SketchCircle_11")
SketchCircle_5.results()[1].setName("SketchCircle_11_2")
SketchConstraintCoincidence_27 = Sketch_1.setCoincident(SketchLine_8.result(), SketchCircle_5.center())
SketchConstraintCoincidence_27.setName("SketchConstraintCoincidence_70")
SketchConstraintRadius_7 = Sketch_1.setRadius(SketchCircle_5.results()[1], "2.5*coeff")
SketchConstraintRadius_7.setName("SketchConstraintRadius_14")
SketchArc_9 = Sketch_1.addArc(40, -13, 35.51437699680511, -13.35942492012782, 37.95784774655168, -8.990060577298436, True)
SketchArc_9.setName("SketchArc_13")
SketchArc_9.result().setName("SketchArc_13")
SketchArc_9.results()[1].setName("SketchArc_13_2")
SketchConstraintCoincidence_28 = Sketch_1.setCoincident(SketchCircle_5.center(), SketchArc_9.center())
SketchConstraintCoincidence_28.setName("SketchConstraintCoincidence_71")
SketchLine_9 = Sketch_1.addLine(37.95784774655168, -5.490060577298436, 37.95784774655168, -8.990060577298436)
SketchLine_9.setName("SketchLine_48")
SketchLine_9.result().setName("SketchLine_48")
SketchConstraintCoincidence_29 = Sketch_1.setCoincident(SketchArc_8.endPoint(), SketchLine_9.startPoint())
SketchConstraintCoincidence_29.setName("SketchConstraintCoincidence_74")
SketchConstraintCoincidence_30 = Sketch_1.setCoincident(SketchArc_9.endPoint(), SketchLine_9.endPoint())
SketchConstraintCoincidence_30.setName("SketchConstraintCoincidence_75")
SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_9.result())
SketchConstraintVertical_2.setName("SketchConstraintVertical_8")
SketchConstraintRadius_8 = Sketch_1.setRadius(SketchArc_9.results()[1], "(2.5+2)*coeff")
SketchConstraintRadius_8.setName("SketchConstraintRadius_15")
SketchConstraintDistance_8 = Sketch_1.setDistance(SketchCircle_5.center(), SketchLine_2.result(), "4*coeff")
SketchConstraintDistance_8.setName("SketchConstraintDistance_22")
SketchLine_10 = Sketch_1.addLine(17.5, -15, 34, -15)
SketchLine_10.setName("SketchLine_43")
SketchLine_10.result().setName("SketchLine_43")
SketchConstraintCoincidence_31 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_10.startPoint())
SketchConstraintCoincidence_31.setName("SketchConstraintCoincidence_73")
SketchArc_10 = Sketch_1.addArc(34, -13.48076923076937, 34, -15, 35.51437699680511, -13.35942492012782, False)
SketchArc_10.setName("SketchArc_14")
SketchArc_10.result().setName("SketchArc_14")
SketchArc_10.results()[1].setName("SketchArc_14_2")
SketchConstraintCoincidence_32 = Sketch_1.setCoincident(SketchLine_10.endPoint(), SketchArc_10.startPoint())
SketchConstraintCoincidence_32.setName("SketchConstraintCoincidence_76")
SketchConstraintTangent_4 = Sketch_1.setTangent(SketchLine_10.result(), SketchArc_10.results()[1])
SketchConstraintCoincidence_33 = Sketch_1.setCoincident(SketchArc_9.results()[1], SketchArc_10.endPoint())
SketchConstraintCoincidence_33.setName("SketchConstraintCoincidence_77")
SketchConstraintTangent_5 = Sketch_1.setTangent(SketchArc_9.results()[1], SketchArc_10.results()[1])
SketchConstraintCoincidence_34 = Sketch_1.setCoincident(SketchArc_9.startPoint(), SketchArc_10.endPoint())
SketchConstraintCoincidence_34.setName("SketchConstraintCoincidence_78")
SketchConstraintDistance_9 = Sketch_1.setDistance(SketchLine_10.endPoint(), SketchLine_2.result(), "2*coeff")
SketchConstraintDistance_9.setName("SketchConstraintDistance_20")
SketchConstraintHorizontal_6 = Sketch_1.setHorizontal(SketchLine_10.result())
SketchConstraintHorizontal_6.setName("SketchConstraintHorizontal_15")
SketchConstraintLength_1 = Sketch_1.setLength(SketchLine_10.result(), "16.5*coeff")
SketchConstraintLength_1.setName("SketchConstraintLength_8")
SketchConstraintLength_2 = Sketch_1.setLength(SketchLine_4.result(), "20.5*coeff")
SketchConstraintLength_2.setName("SketchConstraintLength_9")
SketchLine_11 = Sketch_1.addLine(17.5, 15, 17.5, -15)
SketchLine_11.setName("SketchLine_49")
SketchLine_11.result().setName("SketchLine_49")
SketchLine_11.setAuxiliary(True)
SketchConstraintCoincidence_35 = Sketch_1.setCoincident(SketchArc_5.endPoint(), SketchLine_11.startPoint())
SketchConstraintCoincidence_35.setName("SketchConstraintCoincidence_79")
SketchConstraintCoincidence_36 = Sketch_1.setCoincident(SketchArc_6.endPoint(), SketchLine_11.endPoint())
SketchConstraintCoincidence_36.setName("SketchConstraintCoincidence_80")
SketchConstraintVertical_3 = Sketch_1.setVertical(SketchLine_11.result())
SketchConstraintVertical_3.setName("SketchConstraintVertical_9")
SketchConstraintLength_3 = Sketch_1.setLength(SketchLine_5.result(), "15.6*coeff")
SketchConstraintLength_3.setName("SketchConstraintLength_10")
SketchConstraintLength_4 = Sketch_1.setLength(SketchLine_9.result(), "3.5*coeff")
SketchConstraintLength_4.setName("SketchConstraintLength_11")
SketchConstraintMirror_1_objects = [SketchLine_4.result(), SketchArc_5.results()[1], SketchArc_4.results()[1], SketchLine_6.result(), SketchArc_7.results()[1], SketchLine_7.result(), SketchLine_5.result(), SketchArc_8.results()[1], SketchLine_9.result(), SketchArc_9.results()[1], SketchArc_10.results()[1], SketchLine_10.result(), SketchArc_6.results()[1], SketchArc_3.results()[1]]
SketchConstraintMirror_1 = Sketch_1.addMirror(SketchLine_8.result(), SketchConstraintMirror_1_objects)
[SketchLine_12, SketchArc_11, SketchArc_12, SketchLine_13, SketchArc_13, SketchLine_14, SketchLine_15, SketchArc_14, SketchLine_16, SketchArc_15, SketchArc_16, SketchLine_17, SketchArc_17, SketchArc_18] = SketchConstraintMirror_1.mirrored()
SketchArc_18.setName("SketchArc_22")
SketchArc_18.result().setName("SketchArc_22")
SketchArc_18.results()[1].setName("SketchArc_22_2")
SketchArc_17.setName("SketchArc_21")
SketchArc_17.result().setName("SketchArc_21")
SketchArc_17.results()[1].setName("SketchArc_21_2")
SketchLine_17.setName("SketchLine_55")
SketchLine_17.result().setName("SketchLine_55")
SketchArc_16.setName("SketchArc_20")
SketchArc_16.result().setName("SketchArc_20")
SketchArc_16.results()[1].setName("SketchArc_20_2")
SketchArc_15.setName("SketchArc_19")
SketchArc_15.result().setName("SketchArc_19")
SketchArc_15.results()[1].setName("SketchArc_19_2")
SketchLine_16.setName("SketchLine_54")
SketchLine_16.result().setName("SketchLine_54")
SketchArc_14.setName("SketchArc_18")
SketchArc_14.result().setName("SketchArc_18")
SketchArc_14.results()[1].setName("SketchArc_18_2")
SketchLine_15.setName("SketchLine_53")
SketchLine_15.result().setName("SketchLine_53")
SketchLine_14.setName("SketchLine_52")
SketchLine_14.result().setName("SketchLine_52")
SketchArc_13.setName("SketchArc_17")
SketchArc_13.result().setName("SketchArc_17")
SketchArc_13.results()[1].setName("SketchArc_17_2")
SketchLine_13.setName("SketchLine_51")
SketchLine_13.result().setName("SketchLine_51")
SketchArc_12.setName("SketchArc_16")
SketchArc_12.result().setName("SketchArc_16")
SketchArc_12.results()[1].setName("SketchArc_16_2")
SketchArc_11.setName("SketchArc_15")
SketchArc_11.result().setName("SketchArc_15")
SketchArc_11.results()[1].setName("SketchArc_15_2")
SketchLine_12.setName("SketchLine_50")
SketchLine_12.result().setName("SketchLine_50")
model.do()
Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchArc_4_2f-SketchLine_10f-SketchArc_2_2f-SketchLine_6r-SketchArc_8_2f-SketchArc_9_2r-SketchLine_42f-SketchLine_46f-SketchArc_11_2f-SketchLine_45r-SketchArc_15_2r-SketchArc_16_2f-SketchLine_51f-SketchArc_17_2f-SketchLine_52r-SketchLine_50r-SketchCircle_11_2r-SketchArc_22_2f-SketchArc_21_2r-SketchLine_55f-SketchArc_20_2r-SketchArc_19_2f-SketchLine_54r-SketchArc_18_2f-SketchLine_53r-SketchArc_7_2f-SketchLine_44f-SketchArc_12_2f-SketchLine_48f-SketchArc_13_2f-SketchArc_14_2r-SketchLine_43r-SketchArc_10_2r-SketchCircle_1_2r-SketchCircle_2_2r_wire")], model.selection(), "h_p*coeff", 0)
Sketch_2 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_1_1/To_Face"))
SketchProjection_1 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/SketchCircle_2_2"))
SketchCircle_6 = SketchProjection_1.createdFeature()
SketchCircle_6.setName("SketchCircle_5")
SketchCircle_6.result().setName("SketchCircle_5")
SketchCircle_6.results()[1].setName("SketchCircle_5_2")
SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "Sketch_1/SketchCircle_4_2"))
SketchCircle_7 = SketchProjection_2.createdFeature()
SketchCircle_7.setName("SketchCircle_6")
SketchCircle_7.result().setName("SketchCircle_6")
SketchCircle_7.results()[1].setName("SketchCircle_6_2")
SketchCircle_8 = Sketch_2.addCircle(80, 0, 22)
SketchCircle_8.setName("SketchCircle_7")
SketchCircle_8.result().setName("SketchCircle_7")
SketchCircle_8.results()[1].setName("SketchCircle_7_2")
SketchConstraintCoincidence_37 = Sketch_2.setCoincident(SketchCircle_6.result(), SketchCircle_8.center())
SketchConstraintCoincidence_37.setName("SketchConstraintCoincidence_12")
SketchConstraintRadius_9 = Sketch_2.setRadius(SketchCircle_8.results()[1], "r2*coeff")
SketchConstraintRadius_9.setName("SketchConstraintRadius_6")
model.do()
Extrusion_2 = model.addExtrusion(Part_1_doc, [model.selection("COMPOUND", "Sketch_2")], model.selection(), "10*coeff", 0)
ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchCircle_3_2f_wire")], model.selection(), "p_trou1*coeff", 0, [model.selection("SOLID", "Extrusion_1_1")])
ExtrusionCut_2 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchArc_4_2f-SketchLine_10f-SketchArc_2_2f-SketchLine_6r-SketchArc_8_2f-SketchArc_9_2r-SketchLine_42f-SketchLine_46f-SketchArc_11_2f-SketchLine_45r-SketchArc_15_2r-SketchArc_16_2f-SketchLine_51f-SketchArc_17_2f-SketchLine_52r-SketchLine_50r-SketchCircle_11_2r-SketchArc_22_2f-SketchArc_21_2r-SketchLine_55f-SketchArc_20_2r-SketchArc_19_2f-SketchLine_54r-SketchArc_18_2f-SketchLine_53r-SketchArc_7_2f-SketchLine_44f-SketchArc_12_2f-SketchLine_48f-SketchArc_13_2f-SketchArc_14_2r-SketchLine_43r-SketchArc_10_2r-SketchCircle_1_2r-SketchCircle_2_2r_wire_7")], model.selection(), "p2_trou1*coeff", 0, [model.selection("SOLID", "ExtrusionCut_1_1")])
ExtrusionCut_3 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_4_2f")], model.selection(), "p_trou2*coeff", 0, [model.selection("SOLID", "Extrusion_2_1"), model.selection("SOLID", "ExtrusionCut_2_1")])
ExtrusionCut_4 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_1/Face-SketchArc_4_2f-SketchLine_10f-SketchArc_2_2f-SketchLine_6r-SketchArc_8_2f-SketchArc_9_2r-SketchLine_42f-SketchLine_46f-SketchArc_11_2f-SketchLine_45r-SketchArc_15_2r-SketchArc_16_2f-SketchLine_51f-SketchArc_17_2f-SketchLine_52r-SketchLine_50r-SketchCircle_11_2r-SketchArc_22_2f-SketchArc_21_2r-SketchLine_55f-SketchArc_20_2r-SketchArc_19_2f-SketchLine_54r-SketchArc_18_2f-SketchLine_53r-SketchArc_7_2f-SketchLine_44f-SketchArc_12_2f-SketchLine_48f-SketchArc_13_2f-SketchArc_14_2r-SketchLine_43r-SketchArc_10_2r-SketchCircle_1_2r-SketchCircle_2_2r_wire_8")], model.selection(), "p2_trou*coeff", 0, [model.selection("SOLID", "ExtrusionCut_3_2")])
Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "PartSet/XOY"), "22.5*coeff", False)
Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Plane_1"), "45*coeff", True)
Sketch_3 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_2"))
SketchProjection_3 = Sketch_3.addProjection(model.selection("EDGE", "[Extrusion_1_1/Generated_Face&Sketch_1/SketchArc_4_2][Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6]"), False)
SketchLine_18 = SketchProjection_3.createdFeature()
SketchLine_18.setName("SketchLine_4")
SketchLine_18.result().setName("SketchLine_4")
SketchProjection_4 = Sketch_3.addProjection(model.selection("EDGE", "Sketch_1/SketchLine_6"))
SketchLine_19 = SketchProjection_4.createdFeature()
SketchLine_19.setName("SketchLine_5")
SketchLine_19.result().setName("SketchLine_5")
SketchProjection_5 = Sketch_3.addProjection(model.selection("EDGE", "PartSet/OY"))
SketchLine_20 = SketchProjection_5.createdFeature()
SketchLine_20.setName("SketchLine_7")
SketchLine_20.result().setName("SketchLine_7")
SketchProjection_6 = Sketch_3.addProjection(model.selection("EDGE", "PartSet/OX"))
SketchLine_21 = SketchProjection_6.createdFeature()
SketchLine_21.setName("SketchLine_8")
SketchLine_21.result().setName("SketchLine_8")
SketchLine_22 = Sketch_3.addLine(72.5, 0, 87.5, 0)
SketchLine_22.setName("SketchLine_9")
SketchLine_22.result().setName("SketchLine_9")
SketchConstraintCoincidence_38 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchLine_21.result())
SketchConstraintCoincidence_38.setName("SketchConstraintCoincidence_13")
SketchLine_23 = Sketch_3.addLine(87.5, 0, 87.5, -12)
SketchLine_23.setName("SketchLine_12")
SketchLine_23.result().setName("SketchLine_12")
SketchConstraintCoincidence_39 = Sketch_3.setCoincident(SketchLine_22.endPoint(), SketchLine_23.startPoint())
SketchConstraintCoincidence_39.setName("SketchConstraintCoincidence_14")
SketchLine_24 = Sketch_3.addLine(72.5, -12, 72.5, 0)
SketchLine_24.setName("SketchLine_14")
SketchLine_24.result().setName("SketchLine_14")
SketchConstraintCoincidence_40 = Sketch_3.setCoincident(SketchLine_22.startPoint(), SketchLine_24.endPoint())
SketchConstraintCoincidence_40.setName("SketchConstraintCoincidence_19")
SketchConstraintHorizontal_7 = Sketch_3.setHorizontal(SketchLine_22.result())
SketchConstraintHorizontal_7.setName("SketchConstraintHorizontal_4")
SketchConstraintVertical_4 = Sketch_3.setVertical(SketchLine_24.result())
SketchConstraintVertical_4.setName("SketchConstraintVertical_1")
SketchConstraintVertical_5 = Sketch_3.setVertical(SketchLine_23.result())
SketchConstraintVertical_5.setName("SketchConstraintVertical_2")
SketchConstraintEqual_5 = Sketch_3.setEqual(SketchLine_24.result(), SketchLine_23.result())
SketchConstraintEqual_5.setName("SketchConstraintEqual_3")
SketchConstraintLength_5 = Sketch_3.setLength(SketchLine_22.result(), "15*coeff")
SketchConstraintLength_5.setName("SketchConstraintLength_1")
SketchConstraintLength_6 = Sketch_3.setLength(SketchLine_24.result(), "12*coeff")
SketchConstraintLength_6.setName("SketchConstraintLength_2")
SketchCircle_9 = Sketch_3.addCircle(80, -9, 4)
SketchCircle_9.setName("SketchCircle_8")
SketchCircle_9.result().setName("SketchCircle_8")
SketchCircle_9.results()[1].setName("SketchCircle_8_2")
SketchConstraintDistance_10 = Sketch_3.setDistance(SketchCircle_9.center(), SketchLine_22.result(), "dtrou*coeff")
SketchConstraintDistance_10.setName("SketchConstraintDistance_5")
SketchConstraintRadius_10 = Sketch_3.setRadius(SketchCircle_9.results()[1], "M8*coeff")
SketchConstraintRadius_10.setName("SketchConstraintRadius_7")
SketchConstraintDistance_11 = Sketch_3.setDistance(SketchLine_20.result(), SketchLine_24.endPoint(), "(entraxe-15/2)*coeff")
SketchConstraintDistance_11.setName("SketchConstraintDistance_7")
SketchConstraintDistance_12 = Sketch_3.setDistance(SketchCircle_9.center(), SketchLine_24.result(), "15/2*coeff")
SketchConstraintDistance_12.setName("SketchConstraintDistance_8")
SketchLine_25 = Sketch_3.addLine(85, -17, 75, -17)
SketchLine_25.setName("SketchLine_26")
SketchLine_25.result().setName("SketchLine_26")
SketchLine_26 = Sketch_3.addLine(75, -17, 72.5, -12)
SketchLine_26.setName("SketchLine_27")
SketchLine_26.result().setName("SketchLine_27")
SketchConstraintCoincidence_41 = Sketch_3.setCoincident(SketchLine_25.endPoint(), SketchLine_26.startPoint())
SketchConstraintCoincidence_41.setName("SketchConstraintCoincidence_31")
SketchConstraintCoincidence_42 = Sketch_3.setCoincident(SketchLine_24.startPoint(), SketchLine_26.endPoint())
SketchConstraintCoincidence_42.setName("SketchConstraintCoincidence_32")
SketchLine_27 = Sketch_3.addLine(87.5, -12, 85, -17)
SketchLine_27.setName("SketchLine_28")
SketchLine_27.result().setName("SketchLine_28")
SketchConstraintCoincidence_43 = Sketch_3.setCoincident(SketchLine_23.endPoint(), SketchLine_27.startPoint())
SketchConstraintCoincidence_43.setName("SketchConstraintCoincidence_33")
SketchConstraintCoincidence_44 = Sketch_3.setCoincident(SketchLine_25.startPoint(), SketchLine_27.endPoint())
SketchConstraintCoincidence_44.setName("SketchConstraintCoincidence_34")
SketchConstraintHorizontal_8 = Sketch_3.setHorizontal(SketchLine_25.result())
SketchConstraintHorizontal_8.setName("SketchConstraintHorizontal_7")
SketchConstraintEqual_6 = Sketch_3.setEqual(SketchLine_27.result(), SketchLine_26.result())
SketchConstraintEqual_6.setName("SketchConstraintEqual_7")
SketchConstraintDistance_13 = Sketch_3.setDistance(SketchLine_22.endPoint(), SketchLine_25.result(), "17*coeff")
SketchConstraintDistance_13.setName("SketchConstraintDistance_11")
SketchConstraintDistance_14 = Sketch_3.setDistance(SketchLine_23.result(), SketchLine_25.startPoint(), "2.5*coeff")
SketchConstraintDistance_14.setName("SketchConstraintDistance_12")
model.do()
Extrusion_3 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchLine_14r-SketchLine_27r-SketchLine_26r-SketchLine_28r-SketchLine_12r-SketchLine_9r-SketchCircle_8_2r_wire")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_10"), 0, model.selection(), 0)
Smash_1 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_3_1")], [model.selection("SOLID", "ExtrusionCut_4_1")])
ExtrusionCut_5 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_3/Face-SketchCircle_8_2f_wire")], model.selection(), 10, 0, [model.selection("SOLID", "Smash_1_1_1")])
ExtrusionCut_6 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_3/Face-SketchCircle_8_2f")], model.selection(), 10, 0, [model.selection("SOLID", "ExtrusionCut_5_1_1")])
Sketch_4 = model.addSketch(Part_1_doc, model.selection("FACE", "Plane_1"))
SketchProjection_7 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OY"))
SketchLine_28 = SketchProjection_7.createdFeature()
SketchLine_28.setName("SketchLine_17")
SketchLine_28.result().setName("SketchLine_17")
SketchProjection_8 = Sketch_4.addProjection(model.selection("EDGE", "PartSet/OX"))
SketchLine_29 = SketchProjection_8.createdFeature()
SketchLine_29.setName("SketchLine_18")
SketchLine_29.result().setName("SketchLine_18")
SketchLine_30 = Sketch_4.addLine(7.5, 0, -7.5, 0)
SketchLine_30.setName("SketchLine_19")
SketchLine_30.result().setName("SketchLine_19")
SketchConstraintCoincidence_45 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_29.result())
SketchConstraintCoincidence_45.setName("SketchConstraintCoincidence_22")
SketchLine_31 = Sketch_4.addLine(-7.5, 0, -7.5, -12)
SketchLine_31.setName("SketchLine_20")
SketchLine_31.result().setName("SketchLine_20")
SketchConstraintCoincidence_46 = Sketch_4.setCoincident(SketchLine_30.endPoint(), SketchLine_31.startPoint())
SketchConstraintCoincidence_46.setName("SketchConstraintCoincidence_23")
SketchLine_32 = Sketch_4.addLine(7.5, -12, 7.5, 0)
SketchLine_32.setName("SketchLine_24")
SketchLine_32.result().setName("SketchLine_24")
SketchConstraintCoincidence_47 = Sketch_4.setCoincident(SketchLine_30.startPoint(), SketchLine_32.endPoint())
SketchConstraintCoincidence_47.setName("SketchConstraintCoincidence_28")
SketchConstraintVertical_6 = Sketch_4.setVertical(SketchLine_31.result())
SketchConstraintVertical_6.setName("SketchConstraintVertical_3")
SketchConstraintVertical_7 = Sketch_4.setVertical(SketchLine_32.result())
SketchConstraintVertical_7.setName("SketchConstraintVertical_4")
SketchConstraintEqual_7 = Sketch_4.setEqual(SketchLine_31.result(), SketchLine_32.result())
SketchConstraintEqual_7.setName("SketchConstraintEqual_5")
SketchConstraintMiddle_4 = Sketch_4.setMiddlePoint(SketchLine_30.result(), SketchAPI_Line(SketchLine_29).startPoint())
SketchConstraintMiddle_4.setName("SketchConstraintMiddle_1")
SketchLine_33 = Sketch_4.addLine(-7.5, -12, -5, -17)
SketchLine_33.setName("SketchLine_21")
SketchLine_33.result().setName("SketchLine_21")
SketchConstraintCoincidence_48 = Sketch_4.setCoincident(SketchLine_31.endPoint(), SketchLine_33.startPoint())
SketchConstraintCoincidence_48.setName("SketchConstraintCoincidence_24")
SketchLine_34 = Sketch_4.addLine(-5, -17, 5, -17)
SketchLine_34.setName("SketchLine_22")
SketchLine_34.result().setName("SketchLine_22")
SketchConstraintCoincidence_49 = Sketch_4.setCoincident(SketchLine_33.endPoint(), SketchLine_34.startPoint())
SketchConstraintCoincidence_49.setName("SketchConstraintCoincidence_25")
SketchLine_35 = Sketch_4.addLine(5, -17, 7.5, -12)
SketchLine_35.setName("SketchLine_23")
SketchLine_35.result().setName("SketchLine_23")
SketchConstraintCoincidence_50 = Sketch_4.setCoincident(SketchLine_34.endPoint(), SketchLine_35.startPoint())
SketchConstraintCoincidence_50.setName("SketchConstraintCoincidence_26")
SketchConstraintCoincidence_51 = Sketch_4.setCoincident(SketchLine_32.startPoint(), SketchLine_35.endPoint())
SketchConstraintCoincidence_51.setName("SketchConstraintCoincidence_27")
SketchConstraintEqual_8 = Sketch_4.setEqual(SketchLine_35.result(), SketchLine_33.result())
SketchConstraintEqual_8.setName("SketchConstraintEqual_6")
SketchConstraintHorizontal_10 = Sketch_4.setHorizontal(SketchLine_34.result())
SketchConstraintHorizontal_10.setName("SketchConstraintHorizontal_8")
SketchConstraintLength_7 = Sketch_4.setLength(SketchLine_30.result(), "15*coeff")
SketchConstraintLength_7.setName("SketchConstraintLength_4")
SketchConstraintLength_8 = Sketch_4.setLength(SketchLine_31.result(), "12*coeff")
SketchConstraintLength_8.setName("SketchConstraintLength_5")
SketchConstraintDistance_15 = Sketch_4.setDistance(SketchLine_30.result(), SketchLine_34.endPoint(), "17*coeff")
SketchConstraintDistance_15.setName("SketchConstraintDistance_9")
SketchConstraintLength_9 = Sketch_4.setLength(SketchLine_34.result(), "10*coeff")
SketchConstraintLength_9.setName("SketchConstraintLength_6")
SketchCircle_10 = Sketch_4.addCircle(0, -9, 4)
SketchCircle_10.setName("SketchCircle_9")
SketchCircle_10.result().setName("SketchCircle_9")
SketchCircle_10.results()[1].setName("SketchCircle_9_2")
SketchConstraintRadius_11 = Sketch_4.setRadius(SketchCircle_10.results()[1], "M8*coeff")
SketchConstraintRadius_11.setName("SketchConstraintRadius_8")
SketchLine_36 = Sketch_4.addLine(0, 0, 0, -12.97564207914519)
SketchLine_36.setName("SketchLine_25")
SketchLine_36.result().setName("SketchLine_25")
SketchLine_36.setAuxiliary(True)
SketchConstraintCoincidence_52 = Sketch_4.setCoincident(SketchAPI_Line(SketchLine_28).startPoint(), SketchLine_36.startPoint())
SketchConstraintCoincidence_52.setName("SketchConstraintCoincidence_29")
SketchConstraintVertical_8 = Sketch_4.setVertical(SketchLine_36.result())
SketchConstraintVertical_8.setName("SketchConstraintVertical_5")
SketchConstraintCoincidence_53 = Sketch_4.setCoincident(SketchCircle_10.center(), SketchLine_36.result())
SketchConstraintCoincidence_53.setName("SketchConstraintCoincidence_30")
SketchConstraintDistance_16 = Sketch_4.setDistance(SketchCircle_10.center(), SketchLine_30.result(), "dtrou*coeff")
SketchConstraintDistance_16.setName("SketchConstraintDistance_10")
SketchConstraintLength_10 = Sketch_4.setLength(SketchLine_36.result(), 12.975642079145)
SketchConstraintLength_10.setName("SketchConstraintLength_7")
model.do()
Extrusion_4 = model.addExtrusion(Part_1_doc, [model.selection("WIRE", "Sketch_4/Face-SketchLine_19f-SketchLine_20f-SketchLine_21f-SketchLine_22f-SketchLine_23f-SketchLine_24f-SketchCircle_9_2r_wire")], model.selection(), model.selection("FACE", "Extrusion_1_1/Generated_Face&Sketch_1/SketchLine_6"), 0, model.selection(), 0)
Smash_2 = model.addSmash(Part_1_doc, [model.selection("SOLID", "Extrusion_4_1")], [model.selection("COMPSOLID", "ExtrusionCut_6_1")])
ExtrusionCut_7 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "Smash_2_1_3")])
ExtrusionCut_8 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_4/Face-SketchCircle_9_2f")], model.selection(), 0, 10, [model.selection("SOLID", "ExtrusionCut_7_1_1")])
Sketch_5 = model.addSketch(Part_1_doc, model.selection("FACE", "Smash_2_1_3/Modified_Face&Extrusion_1_1/From_Face"))
SketchPoint_3 = Sketch_5.addPoint(model.selection("VERTEX", "PartSet/Origin"))
SketchPoint_3.setName("SketchPoint_2")
SketchPoint_3.result().setName("SketchPoint_2")
SketchLine_37 = Sketch_5.addLine(-13.96424004376894, -17, -32, -17)
SketchLine_37.setName("SketchLine_29")
SketchLine_37.result().setName("SketchLine_29")
SketchLine_38 = Sketch_5.addLine(-32, 17, -13.96424004376904, 17)
SketchLine_38.setName("SketchLine_30")
SketchLine_38.result().setName("SketchLine_30")
SketchConstraintHorizontal_11 = Sketch_5.setHorizontal(SketchLine_37.result())
SketchConstraintHorizontal_11.setName("SketchConstraintHorizontal_10")
SketchConstraintHorizontal_12 = Sketch_5.setHorizontal(SketchLine_38.result())
SketchConstraintHorizontal_12.setName("SketchConstraintHorizontal_11")
SketchLine_39 = Sketch_5.addLine(model.selection("EDGE", "PartSet/OX"))
SketchLine_39.setName("SketchLine_31")
SketchLine_39.result().setName("SketchLine_31")
SketchConstraintDistance_17 = Sketch_5.setDistance(SketchLine_37.result(), SketchLine_38.startPoint(), "epaisseur*coeff")
SketchConstraintDistance_17.setName("SketchConstraintDistance_13")
SketchArc_19 = Sketch_5.addArc(0, 0, -13.964240043769, 17, -13.964240043769, -17, False)
SketchArc_19.setName("SketchArc_5")
SketchArc_19.result().setName("SketchArc_5")
SketchArc_19.results()[1].setName("SketchArc_5_2")
SketchConstraintCoincidence_54 = Sketch_5.setCoincident(SketchPoint_3.coordinates(), SketchArc_19.center())
SketchConstraintCoincidence_54.setName("SketchConstraintCoincidence_36")
SketchConstraintCoincidence_55 = Sketch_5.setCoincident(SketchLine_38.endPoint(), SketchArc_19.startPoint())
SketchConstraintCoincidence_55.setName("SketchConstraintCoincidence_37")
SketchConstraintCoincidence_56 = Sketch_5.setCoincident(SketchLine_37.result(), SketchArc_19.endPoint())
SketchConstraintCoincidence_56.setName("SketchConstraintCoincidence_39")
SketchConstraintRadius_12 = Sketch_5.setRadius(SketchArc_19.results()[1], "r2*coeff")
SketchConstraintRadius_12.setName("SketchConstraintRadius_11")
SketchLine_40 = Sketch_5.addLine(-32, -17, -32, 17)
SketchLine_40.setName("SketchLine_32")
SketchLine_40.result().setName("SketchLine_32")
SketchConstraintCoincidence_57 = Sketch_5.setCoincident(SketchLine_38.startPoint(), SketchLine_40.endPoint())
SketchConstraintCoincidence_57.setName("SketchConstraintCoincidence_35")
SketchConstraintCoincidence_58 = Sketch_5.setCoincident(SketchLine_40.startPoint(), SketchLine_37.endPoint())
SketchConstraintCoincidence_58.setName("SketchConstraintCoincidence_38")
SketchConstraintDistance_18 = Sketch_5.setDistance(SketchLine_40.result(), SketchArc_19.center(), "d1*coeff-entraxe*coeff")
SketchConstraintDistance_18.setName("SketchConstraintDistance_14")
SketchConstraintVertical_9 = Sketch_5.setVertical(SketchLine_40.result())
SketchConstraintVertical_9.setName("SketchConstraintVertical_6")
SketchConstraintDistance_19 = Sketch_5.setDistance(SketchLine_37.result(), SketchArc_19.center(), "epaisseur/2*coeff")
SketchConstraintDistance_19.setName("SketchConstraintDistance_15")
SketchConstraintCoincidence_59 = Sketch_5.setCoincident(SketchArc_19.endPoint(), SketchLine_37.startPoint())
SketchConstraintCoincidence_59.setName("SketchConstraintCoincidence_40")
model.do()
Extrusion_5 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_5/Face-SketchArc_5_2r-SketchLine_30r-SketchLine_32r-SketchLine_29r")], model.selection(), 0, "22*coeff")
Sketch_6_origin = GeomAPI_Pnt(0, 0, 0)
Sketch_6_norm = GeomAPI_Dir(0, 1, 0)
Sketch_6_dirx = GeomAPI_Dir(1, 0, 0)
Sketch_6 = model.addSketch(Part_1_doc, GeomAPI_Ax3(Sketch_6_origin, Sketch_6_dirx, Sketch_6_norm))
SketchLine_41 = Sketch_6.addLine(-32, -17, -32, 17)
SketchLine_41.setName("SketchLine_33")
SketchLine_41.result().setName("SketchLine_33")
SketchPoint_4 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/SketchLine_29_EndVertex"))
SketchPoint_4.setName("SketchPoint_3")
SketchPoint_4.result().setName("SketchPoint_3")
SketchConstraintCoincidence_60 = Sketch_6.setCoincident(SketchLine_41.startPoint(), SketchPoint_4.result())
SketchConstraintCoincidence_60.setName("SketchConstraintCoincidence_41")
SketchPoint_5 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/SketchLine_30_StartVertex"))
SketchPoint_5.setName("SketchPoint_4")
SketchPoint_5.result().setName("SketchPoint_4")
SketchConstraintCoincidence_61 = Sketch_6.setCoincident(SketchLine_41.endPoint(), SketchPoint_5.result())
SketchConstraintCoincidence_61.setName("SketchConstraintCoincidence_42")
SketchPoint_6 = Sketch_6.addPoint(model.selection("VERTEX", "Sketch_5/SketchPoint_2"))
SketchPoint_6.setName("SketchPoint_5")
SketchPoint_6.result().setName("SketchPoint_5")
SketchLine_42 = Sketch_6.addLine(model.selection("EDGE", "Sketch_5/SketchLine_30"))
SketchLine_42.setName("SketchLine_34")
SketchLine_42.result().setName("SketchLine_34")
SketchLine_43 = Sketch_6.addLine(model.selection("EDGE", "Sketch_5/SketchLine_29"))
SketchLine_43.setName("SketchLine_35")
SketchLine_43.result().setName("SketchLine_35")
SketchArc_20 = Sketch_6.addArc(0, 0, -20.32855135026245, 17, -20.32855135026245, -17, False)
SketchArc_20.setName("SketchArc_6")
SketchArc_20.result().setName("SketchArc_6")
SketchArc_20.results()[1].setName("SketchArc_6_2")
SketchConstraintCoincidence_62 = Sketch_6.setCoincident(SketchPoint_6.result(), SketchArc_20.center())
SketchConstraintCoincidence_62.setName("SketchConstraintCoincidence_43")
SketchConstraintCoincidence_63 = Sketch_6.setCoincident(SketchLine_42.result(), SketchArc_20.startPoint())
SketchConstraintCoincidence_63.setName("SketchConstraintCoincidence_44")
SketchConstraintCoincidence_64 = Sketch_6.setCoincident(SketchLine_43.result(), SketchArc_20.endPoint())
SketchConstraintCoincidence_64.setName("SketchConstraintCoincidence_45")
SketchLine_44 = Sketch_6.addLine(-20.32855135026245, -17, -32, -17)
SketchLine_44.setName("SketchLine_36")
SketchLine_44.result().setName("SketchLine_36")
SketchConstraintCoincidence_65 = Sketch_6.setCoincident(SketchArc_20.endPoint(), SketchLine_44.startPoint())
SketchConstraintCoincidence_65.setName("SketchConstraintCoincidence_46")
SketchConstraintCoincidence_66 = Sketch_6.setCoincident(SketchLine_41.startPoint(), SketchLine_44.endPoint())
SketchConstraintCoincidence_66.setName("SketchConstraintCoincidence_47")
SketchLine_45 = Sketch_6.addLine(-20.32855135026245, 17, -32, 17)
SketchLine_45.setName("SketchLine_37")
SketchLine_45.result().setName("SketchLine_37")
SketchConstraintCoincidence_67 = Sketch_6.setCoincident(SketchArc_20.startPoint(), SketchLine_45.startPoint())
SketchConstraintCoincidence_67.setName("SketchConstraintCoincidence_48")
SketchConstraintCoincidence_68 = Sketch_6.setCoincident(SketchLine_41.endPoint(), SketchLine_45.endPoint())
SketchConstraintCoincidence_68.setName("SketchConstraintCoincidence_49")
SketchConstraintRadius_13 = Sketch_6.setRadius(SketchArc_20.results()[1], "r1*coeff")
SketchConstraintRadius_13.setName("SketchConstraintRadius_10")
model.do()
Extrusion_6 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_6/Face-SketchLine_36r-SketchArc_6_2r-SketchLine_37f-SketchLine_33r")], model.selection(), "77*coeff-h_p*coeff", 0)
Sketch_7 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_6_1/Generated_Face&Sketch_6/SketchLine_33"))
SketchLine_46 = Sketch_7.addLine(37, -8.881784197001252e-16, -22, 1.665334536937735e-15)
SketchLine_46.setName("SketchLine_38")
SketchLine_46.result().setName("SketchLine_38")
SketchLine_46.setAuxiliary(True)
SketchLine_47 = Sketch_7.addLine(model.selection("EDGE", "[Extrusion_6_1/Generated_Face&Sketch_6/SketchLine_33][Extrusion_6_1/To_Face]"))
SketchLine_47.setName("SketchLine_39")
SketchLine_47.result().setName("SketchLine_39")
SketchConstraintCoincidence_69 = Sketch_7.setCoincident(SketchLine_46.startPoint(), SketchLine_47.result())
SketchConstraintCoincidence_69.setName("SketchConstraintCoincidence_50")
SketchLine_48 = Sketch_7.addLine(model.selection("EDGE", "[Extrusion_5_1/Generated_Face&Sketch_5/SketchLine_32][Extrusion_5_1/From_Face]"))
SketchLine_48.setName("SketchLine_40")
SketchLine_48.result().setName("SketchLine_40")
SketchConstraintCoincidence_70 = Sketch_7.setCoincident(SketchLine_46.endPoint(), SketchLine_48.result())
SketchConstraintCoincidence_70.setName("SketchConstraintCoincidence_51")
SketchConstraintMiddle_5 = Sketch_7.setMiddlePoint(SketchLine_46.startPoint(), SketchLine_47.result())
SketchConstraintMiddle_5.setName("SketchConstraintMiddle_2")
SketchConstraintMiddle_6 = Sketch_7.setMiddlePoint(SketchLine_48.result(), SketchLine_46.endPoint())
SketchConstraintMiddle_6.setName("SketchConstraintMiddle_3")
SketchPoint_7 = Sketch_7.addPoint(17, -1.95597787542754e-16)
SketchPoint_7.setName("SketchPoint_6")
SketchPoint_7.result().setName("SketchPoint_6")
SketchConstraintCoincidence_71 = Sketch_7.setCoincident(SketchPoint_7.coordinates(), SketchLine_46.result())
SketchConstraintCoincidence_71.setName("SketchConstraintCoincidence_52")
SketchProjection_9 = Sketch_7.addProjection(model.selection("EDGE", "PartSet/OZ"))
SketchLine_49 = SketchProjection_9.createdFeature()
SketchLine_49.setName("SketchLine_41")
SketchLine_49.result().setName("SketchLine_41")
SketchConstraintDistance_20 = Sketch_7.setDistance(SketchLine_49.result(), SketchPoint_7.coordinates(), "(h_o-h_p)*coeff")
SketchConstraintDistance_20.setName("SketchConstraintDistance_16")
SketchCircle_11 = Sketch_7.addCircle(17, -1.95597787542754e-16, 2.5)
SketchCircle_11.setName("SketchCircle_10")
SketchCircle_11.result().setName("SketchCircle_10")
SketchCircle_11.results()[1].setName("SketchCircle_10_2")
SketchConstraintCoincidence_72 = Sketch_7.setCoincident(SketchPoint_7.coordinates(), SketchCircle_11.center())
SketchConstraintCoincidence_72.setName("SketchConstraintCoincidence_53")
SketchConstraintRadius_14 = Sketch_7.setRadius(SketchCircle_11.results()[1], "r3")
SketchConstraintRadius_14.setName("SketchConstraintRadius_12")
model.do()
ExtrusionCut_9 = model.addExtrusionCut(Part_1_doc, [model.selection("WIRE", "Sketch_7/Face-SketchCircle_10_2f_wire")], model.selection(), 0, "10*coeff", [model.selection("SOLID", "Extrusion_6_1")])
ExtrusionCut_10_objects_1 = [model.selection("WIRE", "Sketch_1/Face-SketchArc_10_2f-SketchLine_43f-SketchArc_14_2f-SketchArc_13_2r-SketchLine_48r-SketchArc_12_2r-SketchLine_44r-SketchArc_7_2r_wire"), model.selection("FACE", "Sketch_1/Face-SketchCircle_11_2f"), model.selection("WIRE", "Sketch_1/Face-SketchLine_50f-SketchLine_52f-SketchArc_17_2r-SketchLine_51r-SketchArc_16_2r-SketchArc_15_2f_wire"), model.selection("FACE", "Sketch_1/Face-SketchLine_53f-SketchArc_18_2r-SketchLine_54f-SketchArc_19_2r-SketchArc_20_2f-SketchLine_55r-SketchArc_21_2f-SketchArc_22_2r"), model.selection("FACE", "Sketch_1/Face-SketchLine_45f-SketchArc_11_2r-SketchLine_46r-SketchLine_42r-SketchArc_9_2f-SketchArc_8_2r")]
ExtrusionCut_10 = model.addExtrusionCut(Part_1_doc, ExtrusionCut_10_objects_1, model.selection(), model.selection("FACE", "ExtrusionCut_3_2/Modified_Face&Extrusion_1_1/To_Face"), 0, model.selection(), 0, [model.selection("SOLID", "ExtrusionCut_8_1_2")])
Sketch_8 = model.addSketch(Part_1_doc, model.selection("FACE", "ExtrusionCut_9_1/Modified_Face&Sketch_6/SketchLine_33"))
SketchLine_50 = Sketch_8.addLine(37, 14.80042035331162, 37, -14)
SketchLine_50.setName("SketchLine_56")
SketchLine_50.result().setName("SketchLine_56")
SketchLine_50.setAuxiliary(True)
SketchLine_51 = Sketch_8.addLine(model.selection("EDGE", "[ExtrusionCut_9_1/Modified_Face&Sketch_6/SketchLine_33][Extrusion_6_1/To_Face]"))
SketchLine_51.setName("SketchLine_57")
SketchLine_51.result().setName("SketchLine_57")
SketchConstraintCoincidence_73 = Sketch_8.setCoincident(SketchLine_50.startPoint(), SketchLine_51.result())
SketchConstraintCoincidence_73.setName("SketchConstraintCoincidence_81")
SketchConstraintCoincidence_74 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_51.result())
SketchConstraintCoincidence_74.setName("SketchConstraintCoincidence_82")
SketchLine_52 = Sketch_8.addLine(model.selection("EDGE", "[Extrusion_6_1/Generated_Face&Sketch_6/SketchLine_36][ExtrusionCut_9_1/Modified_Face&Sketch_6/SketchLine_33]"))
SketchLine_52.setName("SketchLine_58")
SketchLine_52.result().setName("SketchLine_58")
SketchArc_21 = Sketch_8.addArc(34, -14, 37, -14, 33.9999999583228, -17, True)
SketchArc_21.setName("SketchArc_23")
SketchArc_21.result().setName("SketchArc_23")
SketchArc_21.results()[1].setName("SketchArc_23_2")
SketchConstraintCoincidence_75 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchArc_21.startPoint())
SketchConstraintCoincidence_75.setName("SketchConstraintCoincidence_83")
SketchConstraintTangent_6 = Sketch_8.setTangent(SketchLine_50.result(), SketchArc_21.results()[1])
SketchConstraintCoincidence_76 = Sketch_8.setCoincident(SketchLine_52.result(), SketchArc_21.endPoint())
SketchConstraintCoincidence_76.setName("SketchConstraintCoincidence_84")
SketchConstraintTangent_7 = Sketch_8.setTangent(SketchArc_21.results()[1], SketchLine_52.result())
SketchLine_53 = Sketch_8.addLine(34, -17, 37, -17)
SketchLine_53.setName("SketchLine_59")
SketchLine_53.result().setName("SketchLine_59")
SketchConstraintCoincidence_77 = Sketch_8.setCoincident(SketchArc_21.endPoint(), SketchLine_53.startPoint())
SketchConstraintCoincidence_77.setName("SketchConstraintCoincidence_85")
SketchConstraintCoincidence_78 = Sketch_8.setCoincident(SketchLine_51.startPoint(), SketchLine_53.endPoint())
SketchConstraintCoincidence_78.setName("SketchConstraintCoincidence_86")
SketchLine_54 = Sketch_8.addLine(37, -14, 37, -17)
SketchLine_54.setName("SketchLine_60")
SketchLine_54.result().setName("SketchLine_60")
SketchConstraintCoincidence_79 = Sketch_8.setCoincident(SketchLine_50.endPoint(), SketchLine_54.startPoint())
SketchConstraintCoincidence_79.setName("SketchConstraintCoincidence_87")
SketchConstraintCoincidence_80 = Sketch_8.setCoincident(SketchLine_51.startPoint(), SketchLine_54.endPoint())
SketchConstraintCoincidence_80.setName("SketchConstraintCoincidence_88")
SketchConstraintRadius_15 = Sketch_8.setRadius(SketchArc_21.results()[1], "3*coeff")
SketchConstraintRadius_15.setName("SketchConstraintRadius_16")
SketchLine_55 = Sketch_8.addLine(model.selection("EDGE", "Sketch_7/SketchLine_38"))
SketchLine_55.setName("SketchLine_61")
SketchLine_55.result().setName("SketchLine_61")
SketchConstraintMirror_2_objects = [SketchArc_21.results()[1], SketchLine_54.result(), SketchLine_53.result()]
SketchConstraintMirror_2 = Sketch_8.addMirror(SketchLine_55.result(), SketchConstraintMirror_2_objects)
[SketchArc_22, SketchLine_56, SketchLine_57] = SketchConstraintMirror_2.mirrored()
SketchLine_57.setName("SketchLine_63")
SketchLine_57.result().setName("SketchLine_63")
SketchLine_56.setName("SketchLine_62")
SketchLine_56.result().setName("SketchLine_62")
SketchArc_22.setName("SketchArc_24")
SketchArc_22.result().setName("SketchArc_24")
SketchArc_22.results()[1].setName("SketchArc_24_2")
model.do()
ExtrusionCut_11 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_8/Face-SketchLine_59f-SketchLine_60r-SketchArc_23_2r"), model.selection("WIRE", "Sketch_8/Face-SketchLine_62f-SketchLine_63r-SketchArc_24_2r_wire")], model.selection(), 0, "100*coeff", [model.selection("SOLID", "ExtrusionCut_9_1")])
Sketch_9 = model.addSketch(Part_1_doc, model.selection("FACE", "Extrusion_5_1/Generated_Face&Sketch_5/SketchLine_29"))
SketchLine_58 = Sketch_9.addLine(-32, -19, -32, -3.575047476349699)
SketchLine_58.setName("SketchLine_64")
SketchLine_58.result().setName("SketchLine_64")
SketchLine_58.setAuxiliary(True)
SketchLine_59 = Sketch_9.addLine(model.selection("EDGE", "[Extrusion_5_1/Generated_Face&Sketch_5/SketchLine_32][Extrusion_5_1/Generated_Face&Sketch_5/SketchLine_29]"))
SketchLine_59.setName("SketchLine_65")
SketchLine_59.result().setName("SketchLine_65")
SketchConstraintCoincidence_81 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchLine_59.result())
SketchConstraintCoincidence_81.setName("SketchConstraintCoincidence_89")
SketchConstraintCoincidence_82 = Sketch_9.setCoincident(SketchLine_58.endPoint(), SketchLine_59.result())
SketchConstraintCoincidence_82.setName("SketchConstraintCoincidence_90")
SketchLine_60 = Sketch_9.addLine(model.selection("EDGE", "[Extrusion_5_1/Generated_Face&Sketch_5/SketchLine_29][Extrusion_5_1/From_Face]"))
SketchLine_60.setName("SketchLine_66")
SketchLine_60.result().setName("SketchLine_66")
SketchArc_23 = Sketch_9.addArc(-29, -19, -32, -19, -29.00002201340376, -22, False)
SketchArc_23.setName("SketchArc_25")
SketchArc_23.result().setName("SketchArc_25")
SketchArc_23.results()[1].setName("SketchArc_25_2")
SketchConstraintCoincidence_83 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchArc_23.startPoint())
SketchConstraintCoincidence_83.setName("SketchConstraintCoincidence_91")
SketchConstraintTangent_8 = Sketch_9.setTangent(SketchLine_58.result(), SketchArc_23.results()[1])
SketchConstraintCoincidence_84 = Sketch_9.setCoincident(SketchLine_60.result(), SketchArc_23.endPoint())
SketchConstraintCoincidence_84.setName("SketchConstraintCoincidence_92")
SketchConstraintTangent_9 = Sketch_9.setTangent(SketchArc_23.results()[1], SketchLine_60.result())
SketchLine_61 = Sketch_9.addLine(-32, -19, -32, -22)
SketchLine_61.setName("SketchLine_67")
SketchLine_61.result().setName("SketchLine_67")
SketchConstraintCoincidence_85 = Sketch_9.setCoincident(SketchLine_58.startPoint(), SketchLine_61.startPoint())
SketchConstraintCoincidence_85.setName("SketchConstraintCoincidence_93")
SketchConstraintCoincidence_86 = Sketch_9.setCoincident(SketchLine_59.startPoint(), SketchLine_61.endPoint())
SketchConstraintCoincidence_86.setName("SketchConstraintCoincidence_94")
SketchLine_62 = Sketch_9.addLine(-32, -22, -29.00002201340376, -22)
SketchLine_62.setName("SketchLine_68")
SketchLine_62.result().setName("SketchLine_68")
SketchConstraintCoincidence_87 = Sketch_9.setCoincident(SketchLine_59.startPoint(), SketchLine_62.startPoint())
SketchConstraintCoincidence_87.setName("SketchConstraintCoincidence_95")
SketchConstraintCoincidence_88 = Sketch_9.setCoincident(SketchArc_23.endPoint(), SketchLine_62.endPoint())
SketchConstraintCoincidence_88.setName("SketchConstraintCoincidence_96")
SketchConstraintRadius_16 = Sketch_9.setRadius(SketchArc_23.results()[1], "3*coeff")
SketchConstraintRadius_16.setName("SketchConstraintRadius_17")
model.do()
ExtrusionCut_12 = model.addExtrusionCut(Part_1_doc, [model.selection("FACE", "Sketch_9/Face-SketchLine_67f-SketchLine_68f-SketchArc_25_2r")], model.selection(), 0, "100*coeff", [model.selection("SOLID", "Extrusion_5_1")])
model.end()

from GeomAPI import  GeomAPI_Shape

model.testNbResults(Part_1, 1)
model.testNbSubShapes(Part_1, GeomAPI_Shape.SOLID, [6])
